package server.main.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * @auther MingHsZzz
 * @Date 2022/9/6-18:06
 */

@Data
@TableName("role")
public class Role {

    @TableField(value = "id")
    private Integer id;

    @TableField(value = "name")
    private String name;

    @TableField(value = "nameZh")
    private String nameZh;


    @TableField(value = "gmt_modified", fill = FieldFill.UPDATE)
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date gmtCreate;

    @TableField(value = "gmt_create",fill = FieldFill.INSERT)
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date gmtModified;



    @TableField(value = "rdescribe ")
    private String rdescribe;



    @TableField(exist = false)
    List<Permission> permissions;


}
